﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NeuralNetworkPro.Activation_Functions
{
    [Serializable]
    public class IdentityFunction : IActivationFunction
    {

        public double Function(double x)
        {
            return x;
        }

        public double Derivative(double x)
        {
            return 1;
        }

        public override string ToString()
        {
            return Name;
        }

        public string Name
        {
            get { return "IdentityFunction"; }
        }

        public static readonly string FunctionName = "IdentityFunction";
    }
}
